import { ethers } from "ethers";
import MintTask from "../Utils/Task.js";
import {PrintLog} from "../Utils/Utils.js";

const MintData = "";
const MintRpc = "";
const MintProvider = new ethers.providers.JsonRpcProvider(MintRpc);//先初始化链接对象，不然后面初始化占用太多链接
/**
 * 
 * @param {*} AccountObj 自定义的账号操作对象
 * @param {*} index 当前处理到的账号索引
 */
async function Main(AccountObj, index) {
    PrintLog(`当前处理到第 【${index}】个账号，地址为${AccountObj.address}`);
    const wallet = new ethers.Wallet(AccountObj.privateKey, MintProvider);//初始化钱包
    const tx = {
        to: wallet.address,
        gasLimit: ethers.utils.hexlify(30000), // 你可以设置更高的gasLimit
        gasPrice: ethers.utils.hexlify(ethers.utils.parseUnits("350", "gwei")), // 设置gasPrice
        data: "0x646174613a2c7b2270223a227372632d3230222c226f70223a226d696e74222c227469636b223a2273686962222c22616d74223a223130303030303030227d",

  
     
    }

    
}
const accounts = [
  { address: "0x000" },
  { address: "0x001" },
  { address: "0x002" },
  { address: "0x003" },
  { address: "0x004" },
  { address: "0x005" },
  { address: "0x006" },
  { address: "0x007" },
  { address: "0x008" },
  { address: "0x009" },
  { address: "0x010" },
  { address: "0x011" },
  { address: "0x012" },
  { address: "0x013" },
  { address: "0x014" },
  { address: "0x015" },
  { address: "0x016" },
  { address: "0x017" },
  { address: "0x018" },
  { address: "0x019" },
  { address: "0x020" },
];

MintTask.startTask(accounts, 1, 1, Main);

